package com.qzimp.fujiancuo.service.impl;

import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.qzimp.fujiancuo.entity.UserinfoLog;
import com.qzimp.fujiancuo.mapper.UserinfoLogMapper;
import com.qzimp.fujiancuo.service.UserinfoLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  服务层实现。
 *
 * @author 李欧雯
 * @since 2024-12-20
 */
@Service
public class UserinfoLogServiceImpl extends ServiceImpl<UserinfoLogMapper, UserinfoLog> implements UserinfoLogService {
    @Autowired
    private UserinfoLogMapper userinfoLogMapper;
    @Override
    public List<UserinfoLog> queryUserinfoLogs(Integer userId) {
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("userinfo_id",userId);
        return userinfoLogMapper.selectListByQuery(queryWrapper);
    }

    @Override
    public int getUserIdByName(String username) {
        return userinfoLogMapper.getUserIdByName(username);
    }

    @Override
    public List<UserinfoLog> getUserinfoLogs(int id) {
        return userinfoLogMapper.getUserinfoLogs(id);
    }
}
